Replication Archive for Expertise, Networks, and Interpersonal Influence in Congress

-------------------------------------------------------------------------------------------------
Overview:
This repository contains the materials necessary to replicate the paper's analysis
after generating the matched data set.  Unfortunately, the raw material required
to generate the matched data set requires over 24 GB of space, and is therefore
impractical to host online, even in a compressed form.



-------------------------------------------------------------------------------------------------


Acknowledgements:
The committee assignment data used for this study was drawn from Jonathan Woon, Charles Stewart,
and Garrison Nelson.  Data on bills and votes was drawn from the now defunct OpenGov API.


-------------------------------------------------------------------------------------------------

Matching:
While it is impractical to provide the raw data used for matching, the following matching
scripts are provided:
* getDiDData.py
* getInterferenceData.py
* getMatchData.py
* loadCommitteeData.py
* moveToWeights.py
* resolveParty.py

-------------------------------------------------------------------------------------------------


Fitting the Models:
The use of Aronow-Samii-Assenova standard errors to account for the dyadic structure of
the data makes fitting the regressions very slow.  It will take quite a long time to
fit these models without parallelization (on the order of weeks).  These scripts are
designed to be called from the command line, with the first argument
giving the number of cosponsorships required for a copartisan pair to be
``connected'' and the second argument giving the number of cosponsorships
required from an opposite-party pair.  This makes it easier to reuse the scripts
to test sensitivity to different threshholds.

cueingfunctions.R is a modified version of the A-S-A's code, adapted for
efficient parallelization.

The following scripts are used for fitting:
* base_cueing_analysis.R
* buddy_cueing_analysis.R
* chamber_cueing_analysis.R
* cont_cueing_analysis.R
* copartisan_cueing_analysis.R
* exit_cueing_analysis.R
* polar_cueing_analysis.R
* pt_cueing_analysis.R
* reverse_cueing_analysis.R
* time_cueing_analysis.R



-------------------------------------------------------------------------------------------------

Analayzing the Results:
The scripts that generate the tables and figures, coupled with RData files
containing the pre-fitted models, are in the following two files:
* main.R
* appendix.R


-------------------------------------------------------------------------------------------------


Codebook:
agree1: 	 The agreement rate in the committee's jurisdiction during the previous congress.
agree2: 	 The agreement rate in the committee's jurisdiction during the next congress.
n1: 		 The number of votes used to calculate agree1
n2: 		 The number of votes used to calculate agree2
treat: 		 1 if in the treatment group (legA received midsessions assignment), 0 otherwise.
cs: 		 Number of times B cosponsored A's bills in the previous three congresses.
congress: 	 The congress in which the midsession assignment took place.
copartisans: 1 if A and B are from the same party, 0 otherwise.
sgcs: 		 The number of times A cosponsored the bills of copartisan members of the 
			 committee during the previous three congresses.
ogcs: 		 The number of times A cosponsored the bills of opposite-party members of the 
			 committee during the previous three congresses.
sfcs: 		 The number of times B cosponsored the bills of copartisan members of the 
			 committee during the previous three congresses.
ofcs: 		 The number of times B cosponsored the bills of opposite-party members of the 
			 committee during the previous three congresses.
chamber: 	 House or Senate.
committee: 	 4 character code for the committee under consideration.
legA: 		 The bioguide identifier for the cue-giver.
legB:	 	 The bioguide identifier for the cue-taker.
matched: 	 1 if another observation was successfully matched to this one.
weights: 	 The weight of the observation, accounting for the fact that a match may be used 
			 multiple times.
deltay: 	 agree2 - agree1
friend: 	 1 if connected, 0 otherwise.
legA2: 		 legA concatenated with congress.
legB2: 		 legB concatenated with congress.
dyads: 		 The concatenation of legA2 and legB2.